package com.gibs.peixunapi.model;

import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;

@EqualsAndHashCode(callSuper = true)
@Entity
@Data
//@Table(name = "Comment")
public class Comment extends BaseModel {	//学习评论
	@ManyToOne(cascade = CascadeType.REFRESH)
	private VideoClass videoClass;     //视频课程id
	@ManyToOne(cascade = CascadeType.REFRESH)
	private Documentation document;     //文档课程id
	@ManyToOne(cascade = CascadeType.REFRESH)
	private User creator;     //评论人
	private String content;     //评论内容
	private Integer type;     //类型
	@OneToOne(cascade = CascadeType.REFRESH)
	private User accepter;     //接收人
	private boolean isDelete;     //是否删除


}

